package com.zn.bitmapDisplay
{
    import flash.display.BitmapData;
    import flash.display.FrameLabel;
    import flash.geom.Rectangle;

    /**
     * BitmapData动画序列数据类
     * @author zn
     *
     */
    public class BitmapDataVO
    {
        private var _className:String = "";

        private var _bitmapDataList:Vector.<BitmapData> = new Vector.<BitmapData>();

		private var _bitmapDataRectList:Vector.<Rectangle>=new Vector.<Rectangle>();
		
        //value:FrameLabel
        private var _currentLabels:Array=[];

		//key:帧标签名，value:帧索引
		private var _frameLabelDic:Object={};
		
		public var keyFrameDic:Object={};
		
        public function BitmapDataVO(className:String)
        {
            _className = className;
        }

        public function get className():String
        {
            return _className;
        }

        public function get bitmapDataList():Vector.<BitmapData>
        {
            return _bitmapDataList;
        }
		
		public function get bitmapDataRectList():Vector.<Rectangle>
		{
			return _bitmapDataRectList;
		}
		
        public function get currentLabels():Array
        {
            return _currentLabels;
        }
		
		public function get frameLabelDic():Object
		{
			return _frameLabelDic;
		}
		
		public function destory():void
		{
			var bitmapData:BitmapData;
			for (var i:int = 0; i < _bitmapDataList.length; i++) 
			{
				bitmapData=_bitmapDataList[i];
				bitmapData.dispose();
			}
			
			_bitmapDataList=null;
			_currentLabels=null;
			_className=null;
			keyFrameDic=null;
		}
    }
}